/**
 * 
 */
package edu.scheduler.valueobject;

/**
 * @author Admin
 * 
 */
public class BusinessTime implements Comparable<BusinessTime> {
	private Integer hours;

	private Integer minutes;

	public BusinessTime(Integer hours, Integer minutes) {
		this.hours = hours;
		this.minutes = minutes;
	}

	public Integer getHours() {
		return hours;
	}

	public void setHours(Integer hours) {
		this.hours = hours;
	}

	public Integer getMinutes() {
		return minutes;
	}

	public void setMinutes(Integer minutes) {
		this.minutes = minutes;
	}

	@Override
	public int compareTo(BusinessTime o) {
		if (this.hours < o.getHours()) {
			return -1;
		} else if (this.hours > o.getHours()) {
			return 1;
		} else if (this.minutes < o.getMinutes()) {
			return -1;
		} else if (this.minutes > o.getMinutes()) {
			return 1;
		} else {
			return 0;
		}
	}

}
